<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" trimDirectiveWhitespaces="true"%>

<%@ include file="taglib.jsp" %>
	<header>
		<!-- 제목, 메뉴 -->
		<!-- 제목 -->
		<h2>JSP 프로젝트 v1</h2>
			<ul id="nav">
				<li><a href="spv2b.jsp?job=index/index">Home</a></li>
				<c:if test="${sessionScope.login ne 'ok' }">
				<li><a href="?job=join/join">회원가입</a></li>
				</c:if>
				<c:if test="${sessionScope.login eq 'ok' }">
				<li><a href="?job=join/edit">회원수정</a></li>	
				</c:if>
				
				
				<%--2가지 방법 --%>
				<%-- ok가 아닐경우(로그인을 안하면) eq:= ne:!= --%>
				<c:if  test="${sessionScope.login ne 'ok'}" >
					<li><a href="?job=join/login">로그인</a></li>
				</c:if>
				<%--2번째
				<% if(session.getAttribute("login") == null.){%>
					<li><a href="login.jsp">로그인</a></li>
				<%}%>
				 --%>
				
				<%-- ok일 경우(로그인을 하면)--%>
				<c:if  test="${sessionScope.login eq 'ok'}">
					<li><a href="../join/logout.jsp">로그아웃</a></li>
				</c:if>
				<%--2번째 
				<% if(session.getAttribute("login") == "ok"){%>
					<li><a href="logout.jsp">로그아웃</a></li>W
				<%}%>
				--%>
				<li><a href="?job=board/list">게시판</a></li>
				<li><a href="?job=join/myinfo">회원정보</a></li>
			</ul>
			<!-- 구분선 -->
			<div class="hr"></div>
	</header>
